home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mtgrap1c / demo3.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-13  |  1.9 KB  |  76 lines

  1. /*                                                            
  2.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  3.   ▒                                                          ▒
  4.   ▒                                                          ▒
  5.   ▒             Neuromancer's Graphics Library               ▒
  6.   ▒                     Version 1.0c                         ▒
  7.   ▒                                                          ▒
  8.   ▒     This routine demonstrates rectangle and filled       ▒
  9.   ▒     rectangles followed by clipped rectangles            ▒ 
  10.   ▒                                                          ▒   
  11.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  12.   ▒                                                          ▒
  13.   ▒     Project:    MTLIB01.LIB                              ▒
  14.   ▒                 DEMO3.CPP                                ▒
  15.   ▒                                                          ▒ 
  16.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  17. */
  18. #include <iostream.h>
  19. #include <stdlib.h>
  20. #include <conio.h>
  21. #include "video.h"
  22. #include "rect.h"
  23.  
  24. void main(void)
  25. {
  26.  
  27.     mtSetVGAMode();            //Set up VGA Mode
  28.  
  29.  
  30.     while(!kbhit())
  31.     {
  32.        mtRect(random(320),random(200),random(320),random(200), random(256));
  33.     }
  34.  
  35.     getch();
  36.  
  37.     while(!kbhit())
  38.     {
  39.        mtFillRect(random(320),random(200),random(320),random(200), random(256));
  40.     }
  41.  
  42.     getch();
  43.  
  44.     mtClrScr(0);
  45.  
  46.     mtSetWindow(15,15,304,184);    //set up clip region
  47.     mtClrScr(15);            //clear region to color 15
  48.  
  49.     while(!kbhit())
  50.     {
  51.        mtCRect(random(320),random(200),random(320),random(200), random(256));
  52.     }
  53.  
  54.     getch();
  55.  
  56.     while(!kbhit())
  57.     {
  58.        mtCFillRect(random(320),random(200),random(320),random(200), random(256));
  59.     }
  60.  
  61.     getch();
  62.     mtSetTextMode();
  63.  
  64.     cout << "Thank you for using the library!" << endl;
  65.  
  66.     exit(0);
  67.     
  68. }
  69.  
  70.            
  71.             
  72.  
  73.            
  74.  
  75.            
  76.